package com.cyt.work.question.dao;

import com.cyt.base.dao.BaseDao;
import com.cyt.work.question.model.dto.QuestionUserDto;
import com.cyt.work.question.model.po.QuestionUser;
import com.cyt.work.question.model.vo.QuestionUserImportVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问卷用户表
 *
 * @author congcong tao
 * @create 2019/7/8 10:44
 */
public interface QuestionUserDao extends BaseDao<QuestionUser> {

    /**
     * 根据问卷id查询
     * @param questionId
     * @param status 是否提交，0=未提交1=已提交
     * @author congcong tao
     * @date 2019/9/2 16:34
     */
    List<QuestionUserDto> selectByQuestionId(@Param("questionId") String questionId, @Param("status") String status);

    /**
     * 查询二维码用户信息
     * @param questionId
     * @author congcong tao
     * @date 2019/9/9 10:35
     */
    List<QuestionUserDto> selectQrcodeByQuestionId(@Param("questionId") String questionId);

    /**
     * 更改用户状态
     * @param questionId
     * @param userId 为wx_member表id
     * @author congcong tao
     * @date 2019/9/4 8:13
     */
    void updateStatus(@Param("questionId") String questionId, @Param("userId") String userId);

    /**
     * 查询导出数据
     * @param questionId
     * @author congcong tao
     * @date 2019/9/9 9:38
     */
    List<QuestionUserImportVo> selectExportUserByQuestionId(@Param("questionId") String questionId);
}
